<?php

namespace App\Facades;

use AlibabaCloud\Client\Exception\ClientException;
use App\Models\Aliyun;

abstract class AliyunFacade
{
    /**
     * @throws ClientException
     */
    public function __construct(protected Aliyun $aliyun)
    {
        $this->aliyun->initClient();
    }

    /**
     * @throws ClientException
     */
    public static function aliyun(Aliyun $aliyun): static
    {
        return new static($aliyun);
    }
}
